import http from '../plugins/http';

interface IOilItemModal {
    area: string;
    oilPrice92: string;
    oilPrice95: string;
    oilPrice98: string;
    oilPrice0: string;
    updateTime: string;
}

interface IOilresultModal {
    code: number;
    data: IOilItemModal[];
    msg: string;
}

interface IRecentOilDate {
    id: string;
    date: string;
    week: number
  }

interface IResultRecentOilDateModal {
    code: number;
    data: IRecentOilDate[];
    msg: string;
  }

export const getOilList = async () => {
    const result: IOilresultModal = await http.request({
        method: 'get',
        url: '/api/oil/get',
    })
    return result;
}

export const geRecentDate = async () => {
    const result: IResultRecentOilDateModal = await http.get('/api/oil/geRecentDate');
    return result;
}